﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SubtitleDownloader
{
	public class SubtitleItem : VideoItem
	{
		public Uri Url { get; private set; }

		public SubtitleItem(string name, Uri url)
			: base(AddExtension(name))
		{
			Url = url;
		}

		private static string AddExtension(string name)
		{
			if (name != null)
				if (!name.EndsWith(".srt") ||
					!name.EndsWith(".idx") ||
					!name.EndsWith(".sub"))
					return name + ".srt";
			return name;
		}
	}
}
